set -x
while true; do
	nfg=$(mysql -hkmxnode6  -uroot -ppassw0rd -B -e "select count(*) from k2db.field_group;" 2>/dev/null | tail -n 1)
	nasset=$(mysql -hkmx-3 -uroot -ppassw0rd -B -e "select count(*) from k2db.asset;" 2>/dev/null | tail -n 1)
	echo "put sdlg.sdm.nfg $(date +%s) $nfg category=all"
    echo "put sdlg.sdm.nasset $(date +%s) $nasset category=all"
	sleep 10
done | nc 106.120.241.178 4242